IsShow = true //控制 AdminLoginishow 管理员登录 的显示隐藏
$('.AdminLogin').css('display', 'none')
$('.AdminLoginishow').click(() => {
    IsShow = !IsShow
    if (IsShow == true) {
        $('.AdminLogin').css('display', 'none')
    } else {
        $('.AdminLogin').css('display', 'flex')
    }
})
new Vue({
    el: '#Head',
    data() {
        return {
            head_ul_li_hover: 1,
            state: document.body.clientWidth,
            hiddenBox: false,
            headlineS: ["首页", "长远创造", "长远少年", "长远导师", "关于我们"],
            btnWrapClass: ["btn-wrap_p_show0", "btn-wrap_p_show1", "btn-wrap_p_show2"],
            nav_boxClass: ["nav-box1", "nav-box2", "nav-box3", "nav-box4", "nav-box5"],
            hrefs: ["./index.html", "./LongTermCreation.html", "./LongTermTeenager.html", "#", "#"],

        }
    },
    methods: {
        AdminLoginishow() {
            IsShow = !IsShow
            if (IsShow == true) {
                $('.AdminLogin').css('display', 'none')
            } else {
                $('.AdminLogin').css('display', 'flex')
            }
        },
        skip(index) {
            if (this.hrefs[index] != "#") {
                this.head_ul_li_hover = index
                window.location.href = this.hrefs[index]
            } else {
                alert("此页面正在建设中")
            }
        }
    }
})

const LongTermCreation = new Swiper('.LongTermCreation', {
    direction: 'vertical',
    mousewheel: true,
    on: {
        slideChangeTransitionStart: function () {
            $(".LongTermCreation-pagination img").css("width", "90%");
            $(".LongTermCreation-pagination img").eq(this.activeIndex).css("width", "150%");
        },
    },
})
//LongTermCreation.slideTo(2, 1000, false)
new Swiper(".PC_D1_D2_sw", {
    slidesPerView: 3,
})
new Swiper(".LongTermCreation_S2_Mobile_D_Swiper", {
    slidesPerView: 3,
    centeredSlides: true,
    initialSlide: 1,
    spaceBetween: -50
    //loop: true,
})

new Swiper(".LongTermCreation_S4_PC_D2_S", {
    effect: 'coverflow',
    slidesPerView: 3,
    centeredSlides: true,
    coverflowEffect: {
        rotate: 0,
        stretch: "10%",
        depth: 10,
        modifier: 5,
        slideShadows: true
    },
    initialSlide: 1,
    loop: true,

})

$(".LongTermCreation-pagination li").click(function () {
    $(this).siblings().children().css("width", "90%");
    $(this).children().css("width", "150%");
    LongTermCreation.slideTo($(this).index(), 500, false);//切换slide
})


// 全屏播放
$(document).ready(function () {
    const ele = $(".LongTermCreation_Mobile video")
    for (let i = 0; i < ele.length; i++) {
        ele.eq(i).on('fullscreenchange', function () {
            if (ele.eq(i).is(':fullscreen')) {
                // 在这里添加进入全屏后的处理逻辑
                $(".LongTermCreation_Mobile").css("display","block")
            } else {
                // 在这里添加退出全屏后的处理逻辑
                $(".LongTermCreation_Mobile").css("display","none")
            }
        });
    }
});
